package com.beerandjesus.webapp.sportofkings.handicapper.struts.action;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

import java.io.*;

/**
 * Date: 2/2/13
 * Time: 9:01 AM
 */
@Component
public class PrintAction extends BaseAnalyzeAction {

    private String trackCode;
    private String raceDate;

    public String execute() throws Exception {
        String analysisResult = readResult();
        if (analysisResult == null) {
            analysisResult = "No stored result found.";
        }
        setAnalysisResult(analysisResult);
        setTitle(constructPageTitle(getTrackCode(), getRaceDate()));
        return SUCCESS;
    }

    public String getTrackCode() {
        return trackCode;
    }

    public void setTrackCode(String trackCode) {
        this.trackCode = trackCode;
    }

    public String getRaceDate() {
        return raceDate;
    }

    public void setRaceDate(String raceDate) {
        this.raceDate = raceDate;
    }


}
